body {
  font-family: 'Arial', sans-serif;
  background-color: #1a1a1a;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: #e0e0e0;
  overflow: hidden;
}

.background-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a, #2c2c2c, #1a1a1a, #2c2c2c);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
  opacity: 0.8;
  /* 调整透明度 */
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.chat-container {
  width: 100%;
  /* max-width: 600px; */
  background: rgba(30, 30, 30, 0.9);
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.chat-header {
  background: #2c2c2c;
  color: #e0e0e0;
  padding: 15px;
  text-align: center;
  font-size: 1.5em;
  border-bottom: 1px solid #3c3c3c;
  display: flex;
  justify-content: center;
}

.chat-messages {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  border-bottom: 1px solid #3c3c3c;
}

.message {
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
}

.message-inner {
  display: flex;
  align-items: flex-start;
}

.message.user .message-inner {
  display: flex;
  align-items: flex-start;
  flex-direction: row-reverse;
}


.message .avatar-container {
  display: flex;
  align-items: center;
}

.message .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 10px;
  background-size: cover;
}

.message.user .avatar {
  background-image: url('https://via.placeholder.com/30?text=U');
}

.message.bot .avatar {
  width: 64px;
  border-radius: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url('https://www.blueos.com.cn/static/img/blue-logo-white.a8b77b31.svg');
}

.message .content-container {
  margin: 0 10px;
  padding: 10px;
  border-radius: 10px;
}

.message.user .content-container {
  background: #4caf50;
  color: #ffffff;
}

.message.bot .content-container {
  background: #2196f3;
  color: #ffffff;
}

.message .content {
  font-size: 14px;
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s forwards;
  /* white-space: pre-line; */
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message .content::before {
  content: '';
  position: absolute;
  top: 12px;
  border-width: 6px;
  border-style: solid;
}



.message.user .content::before {
  left: 100%;
  border-color: transparent transparent transparent #4caf50;

}



.message.bot .content::before {
  right: 100%;
  border-color: transparent #2196f3 transparent transparent;

}

.message .name {
  font-weight: bold;
  display: flex;
  align-items: center;
  width: 40px;
  /* margin-bottom: 5px; */
}

.message.user {
  justify-content: flex-end;
}

.message.user .name {
  text-align: right;
}

.message.bot {
  justify-content: flex-start;
}

.chat-input {
  display: flex;
  padding: 10px;
  background: #2c2c2c;
  border-top: 1px solid #3c3c3c;
}

.chat-input input[type="text"] {
  flex: 1;
  padding: 10px;
  border: 1px solid #3c3c3c;
  border-radius: 5px;
  background: #1e1e1e;
  color: #e0e0e0;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.chat-input input[type="text"]:focus {
  border-color: #2196f3;
  box-shadow: 0 0 10px rgba(33, 150, 243, 0.5);
}

.chat-input button {
  margin-left: 10px;
  padding: 10px 15px;
  border: none;
  background: #2196f3;
  color: #ffffff;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.chat-input button:hover {
  background: #1976d2;
}

.chat-footer {
  background: #2c2c2c;
  color: #e0e0e0;
  padding: 10px;
  text-align: center;
  font-size: 0.9em;
  border-top: 1px solid #3c3c3c;
}

.loading-indicator {
  margin: 10px 0;
  text-align: center;
}

.loading-indicator.active {
  display: block;
}

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: #2196f3;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.thinking-text {
  font-size: 14px;
  color: #e0e0e0;
  margin-top: 10px;
}

.file-container {
  display: flex;
  align-items: center;
  /* border: 1px solid #ccc;
  padding: 20px;
  margin: 20px; */
  /* width: 300px; */
  /* text-align: center; */
}

.file-name {
  font-size: 18px;
  margin-bottom: 10px;
}

.download-button {
  background-color: #4CAF50;
  color: white;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.download-button:hover {
  background-color: #45a049;
}

.download-link {
  color: #fff;
  text-decoration: underline;
  font-size: medium;
}
.preview-container {
  background-color: #000;
  width: 233px;
  height: 233px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  display: flex;
  width: 160px;
  height: 160px;
  flex-direction: column;
  background-size: cover;
}

body,
ul,
li,
dl,
dt,
dd,
p,
ol,
h1,
h2,
h3,
h4,
h5,
h6,
form,
img,
table,
fieldset,
legend {
  margin: 0;
  padding: 0;
}

ul,
li,
ol {
  list-style: none;
}

img,
fieldset {
  border: 0;
}

img {
  display: block;
}

a {
  text-decoration: none;
  color: #333;
}

input,
a {
  outline: none;
}